package com.ytjj.qmyx.admin.mapper;

import com.ytjj.qmyx.admin.model.Dept;
import com.ytjj.qmyx.admin.model.Role;
import com.ytjj.qmyx.admin.model.vo.DeptVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeptMapper {

     List<DeptVO> deptLists(@Param("name") String name,@Param("compellation") String compellation,@Param("roleName")  String roleName,@Param("deptId") Integer deptId);

     List<DeptVO> deptList(@Param("id")Integer id);

     List<Role> roleList(Integer id);

     int insertDept(String deptName);

     int updateDept(Dept dept);

     Dept selectDept(Integer id);

     int deleteDept(Integer id);

     int adminList(Integer id);

     List<Role> findRoleByDeptId(@Param("id") Integer id);

     Integer findByDeptName(String deptName);

     int updateRoleByAdminId(Integer roleId,Integer adminId);
}
